//40
#include"bits/stdc++.h"
using namespace std;
int a[1000],h1,h2;
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		if(a[i]%2==0)
		{
			h1+=1;
		}
		else
		{
			h2+=1;
		}
	}
	cout<<h2<<" "<<h1;
}
